<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDrawersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('drawers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('user_id')->default(0)->comment('用户id，关联用户表的id');
            $table->string('title', 100)->comment('抽屉标题');
            $table->string('intro', 500)->nullable()->comment('抽屉描述');
            $table->tinyInteger('is_active')->default(1)->comment('是否有效 1有效 0无效');
            $table->tinyInteger('is_audit')->default(1)->comment('是否审核 0为没有审核 1有审核通过 -1 为审核不通过');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
